home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1990 May / 1990-05.d64 / custom cursor (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  103 lines

  1. 5 rem copyright 1990 compute! publications, inc. - all rights reserved
  2. 6 poke53280,14:poke53281,6
  3. 10 sa=49152:rem starting address
  4. 20 gosub63000:clr
  5. 30 sa=peek(253)*256+peek(254):co=sa+3:cf=sa+6:rem define jump table addresses
  6. 40 dim sp(8):rem default speeds
  7. 50 restore
  8. 60 for a=0 to 8:read sp(a):next
  9. 70 data 0,2,3,5,9,255,3,3,3
  10. 80 cn=1:cc=16:s=sp(cn)
  11. 90 sys sa,cn,cc,s
  12. 100 print"[155][147]";
  13. 110 print" use:"
  14. 120 print"   f1/2 - to change number"
  15. 130 print"   f3/4 - to change color"
  16. 140 print"   f5/6 - to change speed"
  17. 150 print"   f7 - to view help"
  18. 160 print"   f8 - to quit"
  19. 170 print"  you may type any keys you wish: ";
  20. 180 gosub490
  21. 190 sys co,2:getg$:g=asc(g$)
  22. 200 if g<133 or g>141 then460
  23. 210 if g$<>"[133]" then230
  24. 220 cn=cn+1:goto250
  25. 230 if g$<>"[137]" then280
  26. 240 cn=cn-1
  27. 250 if cn>8 then cn=cn-9:goto250
  28. 260 if cn<0 then cn=cn+9:goto260
  29. 270 s=sp(cn):goto420
  30. 280 if g$<>"[134]" then300
  31. 290 cc=cc+1:goto320
  32. 300 if g$<>"[138]" then350
  33. 310 cc=cc-1
  34. 320 if cc>16 then cc=cc-17:goto320
  35. 330 if cc<0 then cc=cc+17:goto330
  36. 340 goto420
  37. 350 if g$="[135]" then s=s+1:goto400
  38. 360 if g$="[139]" then s=s-1:goto410
  39. 370 if g$="[136]" then100
  40. 380 if g$="[140]" then end
  41. 390 :
  42. 400 if s>255 then s=s-256:goto400
  43. 410 if s<0 then s=s+256:goto410
  44. 420 if cn=0 then sys sa,cn:goto440
  45. 430 sys sa,cn,cc,s
  46. 440 gosub490
  47. 450 goto190
  48. 460 printg$;
  49. 470 goto190
  50. 480 stop
  51. 490 rem print cursoring info
  52. 500 sys cf
  53. 510 poke783,1:sys65520:sc=peek(646):rem save current cursor position and color
  54. 520 print"[155]"tab(27)"cursor info-"
  55. 530 print tab(28)"number: ";
  56. 540 print right$(str$(cn),1)
  57. 550 print tab(29)"color: ";
  58. 560 print right$("0"+mid$(str$(cc),2),2)
  59. 570 print tab(29)"speed: ";
  60. 580 print right$("00"+mid$(str$(s),2),3)
  61. 590 poke783,0:sys65520:poke646,sc:rem restore cursor position and color
  62. 600 return
  63. 610 :
  64. 63000 a=peek(61)+peek(62)*256:poke66,int(a/256):poke65,a-peek(66)*256
  65. 63010 rem next line does a selective restore
  66. 63020 print"[147]  please wait 5 seconds...reading data"
  67. 63030 nb=355
  68. 63040 if sa<>0 then63070
  69. 63050 e=peek(55)+peek(56)*256
  70. 63060 b=e-nb:goto63080
  71. 63070 b=sa:e=b+nb
  72. 63080 fora=btoe-1:readd%:ifd%>=0then63100
  73. 63090 l=d%+e:d%=l/256:d1%=l-d%*256:pokea,d1%:a=a+1
  74. 63100 pokea,d%:next
  75. 63110 a=b+127:poke b+12,a/256:poke b+31,a-int(a/256)*256
  76. 63120 print"  completed"
  77. 63130 if sa<>0 then63150
  78. 63140 poke 55,b-int(b/256)*256:poke 56,b/256
  79. 63150 poke 253,b/256:poke 254,b-peek(253)*256
  80. 63160 return
  81. 63170 :
  82. 63180 data  76,-344,76,-150,76,-132,49,234,160,192,204,21,3,240
  83. 63190 data  26,174,20,3,142,-346,174,21,3,142,-345,162,127,56,120
  84. 63200 data  142,20,3,140,21,3,88,176,1,96,32,-243,224,1,176,8
  85. 63210 data  174,-346,172,-345,144,230,224,9,144,5,162,14,76,55,164
  86. 63220 data  202,138,10,168,185,-111,141,-189,185,-110,141,-188
  87. 63230 data  189,-95,141,-216,169,0,141,-192,32,-243,224,17,176
  88. 63240 data  217,142,-165,32,-243,142,-216,96,32,121,0,208,3,104
  89. 63250 data  104,96,32,155,183,96,76,97,234,32,234,255,165,204,208,246,198
  90. 63260 data  205,208,242,169,2,133,205,164,211,165,207,208,14,177,209,230,207
  91. 63270 data  133,206,32,36,234,177,243,141,135,2,162,0,232,189,-87,208
  92. 63280 data  4,162,0,240,247,142,-192,201,32,208,8,174,135,2,165,206
  93. 63290 data  76,94,234,162,16,224,16,144,3,174,134,2,201,160,208,240,76
  94. 63300 data  90,234,169,0,133,204,32,-243,138,240,7,165,198,240,252,202
  95. 63310 data  208,1,96,169,1,133,204,165,207,240,012,165,206,174,135,2,160
  96. 63320 data  0,132,207,32,19,234,96,-87,-54,-45,-36,-33
  97. 63330 data  -31,-22,-5,2,3,5,9,255,3,3,3,99,119,120
  98. 63340 data  226,249,239,228,160,227,247,248,98,121,111,100,32,100,111,121,98
  99. 63350 data  248,247,227,160,228,239,249,226,120,119,99,32,0,124,225,108,98
  100. 63360 data  123,97,126,226,0,110,93,112,64,109,93,125,64,0,100,32,0
  101. 63370 data  160,0,226,95,225,233,98,223,97,105,0,99,69,68,64,70,82
  102. 63380 data  100,32,100,82,70,67,68,69,99,32,0,64,77,93,78,0
  103.